import React from 'react';
import { NavBar, Icon } from 'antd-mobile';
import './style.scss'
import RightPopover from '../rightPopover'
import History from 'lib/history'

export default class navBar extends React.PureComponent {
    state = {
        visible: true,
        selected: '',
    };
    goBack = () => {
        History.goBack();
    }
    render() {
        return (
            <div className="navBar">
                <NavBar
                    mode="light"
                    icon={<Icon type="left" />}
                    onLeftClick={this.goBack}
                    rightContent={
                        <RightPopover >
                            <Icon type="ellipsis" />
                        </RightPopover>
                    }
                >
                    {this.props.title}
                </NavBar>
            </div>
        );
    }
}